<template>
	<view class="p10">
		<view class="p10 homeboxtext" v-for="(item,index) in arr">
			<view class="flex1 flex-between size-24">
				<view class="">
					<view class="mb-14">
						{{item.nick_name}}
					</view>
					<view class="homeboxtext-time">
						{{item.create_time}}
					</view>
				</view>
				<view class="center fw">
					抽中{{item.name}}
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				arr: []
			}
		},
		onLoad(options) {
			this.box_id = options.box_id
			console.log(this.box_id);
		},
		onShow() {
			this.$http('api/box/boxRecord', {
				box_id: this.box_id,
				page: 1,
				pagesize: 10,
			}).then(res => {
				console.log(res);
				// this.arr = res.data
				this.arr = this.arr.concat(res.data)
				this.$http('api/box/boxRecord', {
					box_id: this.box_id,
					page: 2,
					pagesize: 10,
				}).then(res => {
					this.arr = this.arr.concat(res.data)
					// this.arr = res.data
				})
			})
		},
		methods: {

		}
	}
</script>

<style lang="less" scoped>
	.homeboxtext-time {
		color: darkgray;
	}

	.homeboxtext {
		border-bottom: 2rpx solid darkgray;
	}
</style>
